home *** CD-ROM | disk | FTP | other *** search
- The heading function takes no parameters. The “the” is optional. It returns the current heading in degrees. Example:
-
- put the heading into oldHeading
- <do something>
- set heading oldHeading.
-
- The position function can only be used in a put command:
-
- put [the] position into <x,y>
-
- where x & y are variables. It returns the current pen coordinates.
-
- The random function returns a random integer within the ± range of its parameter. Thus
-
- random(100)
-
- returns anything from -99 to +99 inclusive. The maximum parameter is 32767.
-
- The round function rounds its parameter to the nearest integer. Round(0.5) is rounded up to 1.
-
- The trunc function truncates its parameter, i.e., removes any fractional value. Example:
-
- trunc(1.9) = 1
-
- The abs function forces the sign of its parameter to positive. Thus abs(-1) = 1. This can be used with random to get a positive range of values:
-
- abs(random(100))
-
- returns values 0..99.
-
- The sin function returns the sine of its parameter:
-
- sin(param)
-
- The parameter represents degrees.
-
- The cos function returns the cosine of its parameter:
-
- cos(param)
-
- The parameter represents degrees.
-
- The tan function returns the tangent of its parameter:
-
- tan(param)
-
- The parameter represents degrees.
-
- The arcTan function returns the arctangent of its parameter. This is the inverse of the tangent function:
-
- arctan(tan(n)) = n
-
- The sqrt function returns the square root of its parameter:
-
- sqrt(param).
-
- Negative parameters are illegal.
-
-